<?php
	if(!session_id())
	{
	 session_start();
	}	
	set_time_limit(900);	
	@ini_set("memory_limit","80M");
	add_theme_support('menus');
	
	## index
	//include TEMPLATEPATH.'/admins/index.php';
	
	## subscriber
	include TEMPLATEPATH.'/incs/subscriber/instal_data.php';
	
	## Modifys
	include TEMPLATEPATH.'/modifys/remove-defaults.php';
	include TEMPLATEPATH.'/modifys/modify-defaults.php';
	include TEMPLATEPATH.'/modifys/modify-menu.php';
	include TEMPLATEPATH.'/modifys/support.php';
    
   	## email
	include TEMPLATEPATH.'/mails/smtp.php';	
	
	## Meta Box
	//include TEMPLATEPATH .'/incs/metaboxs/meta-box-3.2.2.class.php';
	//include TEMPLATEPATH .'/incs/metaboxs/meta-box.php';
	include TEMPLATEPATH .'/incs/myfunctions.php';
	include TEMPLATEPATH .'/incs/metaboxs/index.php';
		
	//include TEMPLATEPATH .'/incs/metaboxs/custom-metaboxes-page/example-functions.php';
	//include TEMPLATEPATH .'/incs/metaboxs/custom-metaboxes-page/init.php';
	
	## Taxonomy Box
	include TEMPLATEPATH .'/incs/taxonomyboxs/taxonomy-meta.php';
	include TEMPLATEPATH .'/incs/taxonomyboxs/taxonomy-meta-usage.php';
	require_once TEMPLATEPATH.'/incs/resize_image.php';
	//include TEMPLATEPATH .'/incs/taxonomyboxs/simple-term-meta.php';
	//include TEMPLATEPATH .'/incs/taxonomyboxs/simple-term-meta-usage.php';
	
	## incs
	//include TEMPLATEPATH .'/incs/analytics.php';
	include TEMPLATEPATH .'/incs/breadcrums.php';
	include TEMPLATEPATH .'/incs/page-nav.php';
	
	include TEMPLATEPATH .'/incs/seos/vietnamese-slug.php';
	include TEMPLATEPATH .'/incs/seos/search-engine-optimization.php';
	include TEMPLATEPATH .'/incs/soluongtruycap.php';    
	
	//include TEMPLATEPATH .'/incs/metaboxs/index.php';
	## post meta
	include TEMPLATEPATH .'/postmetas/custom-post.php';
	include TEMPLATEPATH .'/postmetas/custom-taxonomy.php';
	
	## orders
	include TEMPLATEPATH .'/orders/index.php';
	## Payment
	//require_once TEMPLATEPATH .'/incs/payments/paypal/payment_db.php';
	//require_once TEMPLATEPATH .'/incs/payments/paypal/payments.php';
	//require_once TEMPLATEPATH .'/incs/payments/paypal/paypal.php';
	
	### filters
	include TEMPLATEPATH .'/filters/filters.php';
	
	## rewrite
	include TEMPLATEPATH .'/rewrites/remove-category-slug.php';
	include TEMPLATEPATH .'/rewrites/add-html.php';
	
	## post_tag for page
	
	$current_user = wp_get_current_user();
	
	$myrole = wp_get_user_roles_by_user_id( $current_user->ID );
	$usermeta = get_the_author_meta( 'add_user_role', $current_user->ID );
	//print_r($current_user);
	//print_r($myrole);
	
	if($myrole[0]=="administrator" && ($current_user->user_login=="admin" || $current_user->user_login=="dbthanhbinh"))
	{
		//include TEMPLATEPATH .'/admins/controller-admin.php';
	}